package com.lzy.pattern.singleton.demo1;

/**
 * @ClassName: Client
 * @Description: 饿汉式单例模式测试
 * @Author: LiuZy
 * @Date: 2022/4/9 19:16
 * @Version: 1.0
 */
public class Client {

    public static void main(String[] args) {
        Singleton instance1 = Singleton.getInstance();
        Singleton instance2 = Singleton.getInstance();

        System.out.println(instance1 == instance2);
        System.out.println(instance1.hashCode());
        System.out.println(instance2.hashCode());
    }
}